
/**
 该功能不再启用  ，被TF_KSS 模组覆盖
 */
Destiny_hunger = {
	_oldStamina = 0;
	_newStamina = 0;
	while {true} do {
		//if (!alive player) exitWith {};
		_oldStamina = getStamina player;
		_rmsleep = (random 5);
		if (_oldStamina != _newStamina) then {
			_rmsleep = 0;
		};
		sleep 4 + _rmsleep;
		if (isWalking player) then {
			[1,0.001] spawn Destiny_fnc_SetHunger;
		} else {
			[1,0.002] spawn Destiny_fnc_SetHunger;
		};
		_newStamina = getStamina player;
		_hunger = player getVariable ["destiny_hunger",0];
		if (_hunger <= 0) then {
			[0.01] call Destiny_setDamage;
		};
	};
};

Destiny_thirsty = {
	_oldStamina = 0;
	_newStamina = 0;
	while {true} do {
		//if (!alive player) exitWith {};
		_oldStamina = getStamina player;
		_rmsleep = (random 5);
		if (_oldStamina != _newStamina) then {
			_rmsleep = 0;
		};
		sleep 2 + _rmsleep;
		if (isWalking player) then {
			[1,0.001] spawn Destiny_fnc_SetThirsty;
		} else {
			[1,0.002] spawn Destiny_fnc_SetThirsty;
		};
		_newStamina = getStamina player;
		_hunger = player getVariable ["destiny_thirsty",0];
		if (_hunger <= 0) then {
			[0.01] call Destiny_setDamage;
		};
	};
};

Destiny_setDamage = {
	_damage = damage player;
	player setDamage (_damage + _this#0);
};

if (!isNil "DFH") then {
	terminate DFH;
};
if (!isNil "DFT") then {
	terminate DFT;
};

//设置饥渴
//DFH = [] spawn Destiny_hunger;
//DFT = [] spawn Destiny_thirsty;


